<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions">

  <!-- This is the default sidebar menu for HRMS -->
  <head>
    <title>IGNORED</title>
  </head>

  <body>
    <ui:composition>
      <!-- When this file is included in a templage, only the content of
      the ui:composition tag is used. The rest is discarded -->
      <h3>#{strings.menu_h1}</h3>
      <!-- the panelGrid line up things nicely... -->
      <h:panelGrid columns="1">
        <!--
        One link for each menu choice. The outcome specifies the page to go
        to. The styleClass property can be used to select css rules for the
        specified class. Here, a conditional expression (an "if statement"
        that returns a value) is used to highlight which page the user is
        seeing.
        It works because the names of all pages in each "module" starts with
        the module name. The fn:startsWith function checks the name of
        the current page. If the name starts with the module name, then the
        styleClass is set to bold, otherwise it is plain. (How the link is
        highlighted is defined in the stylesheet. It doesn't have to be
        bold)
        -->
        <h:link value="#{strings.login_menuitem}" outcome="login"
                styleClass="#{fn:startsWith(view.viewId,'/login') ? 'bold' : 'plain'}" />
        <h:link value="#{strings.register_menuitem}" outcome="register"
                styleClass="#{fn:startsWith(view.viewId,'/register') ? 'bold' : 'plain'}" />

      </h:panelGrid>
    </ui:composition>
  </body>
</html>